/**
 * 
 */
package cn.agiledata.bank.common.exception;


/**
 * 账户服务异常.
 * 
 * @author 马贤波
 *
 * Mar 31, 2006
 */
public class BusinessException extends RuntimeException {
	
	public static BusinessException INFRA_FAILURE = new BusinessException ("infra_failure") ;
	public static BusinessException BLACKLIST_LOGIN = new BusinessException ("blacklist_login") ;
	public static BusinessException ACCOUNTCOMPANY_AUTHENTICATION = new BusinessException ("accountcompany_authentication") ;
	public static BusinessException INFORMAL_FORM = new BusinessException ("对不起，您提交的数据格式不正确，请核实！","informal_form") ;
	public static BusinessException WRONG_VERIFYCODE = new BusinessException ("对不起，您的校验码填写错误！","wrong_verifycode") ;
	public static BusinessException VERIFYCODE_INVALID = new BusinessException ("对不起，您的校验码已经失效，需要重新输入（校验码的有效期是15分钟）！","verifycode_invalid") ;
	public static BusinessException WRONG_SMS_CONFIRM = new BusinessException ("对不起，您的手机确认码填写不符，请核实！","wrong_sms_confirm") ;
	
	public static BusinessException NOT_LOGON = new BusinessException ("not_logon") ;
	public static BusinessException NOT_SMS_SUBMIT = new BusinessException ("对不起，您还没有正确填写您的手机号码，请您重新填写您的手机号码，并发送，谢谢！","not_sms_submit") ;
	public static BusinessException NOT_PERMIT_SECTION = new BusinessException ("not_permit_section") ;
	public static BusinessException NOT_PERMIT_SERVICE = new BusinessException ("not_permit_service") ;
	public static BusinessException NOT_PERMIT_DOMAIN = new BusinessException ("not_permit_domain") ;
	
	public static BusinessException LOGON_ACCOUNT_NOT_EXIST = new BusinessException ("logon_account_not_exist","0004") ;
	public static BusinessException LOGON_ACCOUNT_ERROR= new BusinessException ("logon_account_error","0004") ;
	public static BusinessException LOGON_ACCOUNT_NOT_ACTIVE = new BusinessException ("logon_account_not_active","0005") ;
	public static BusinessException LOGON_ACCOUNT_LOCK = new BusinessException ("logon_account_lock","0006") ;
	public static BusinessException LOGON_ACCOUNT_LOGIN_LOCK = new BusinessException("logon_account_login_lock","0007") ;
	public static BusinessException LOGON_ACCOUNT_CANCEl = new BusinessException("logon_account_cancel","0009");
	public static BusinessException IVR_STATUS_NOT = new BusinessException("ivr_status_not","0008") ;
	public static BusinessException LOGON_NOT_ENTERPRISE = new BusinessException ("logon_not_enterprise") ;
	public static BusinessException LOGON_NOT_PERSONAL = new BusinessException ("logon_not_personal") ;
	public static BusinessException LOGON_PASSWORD_ERROR = new BusinessException ("logon_password_error","0002") ;
	public static BusinessException LOGON_PASSWORD_OVERDATE=new BusinessException("logon_password_overdate");
	public static BusinessException LOGON_OPERATOR_NOT_EXIST = new BusinessException ("logon_operator_not_exist") ;
	public static BusinessException LOGON_OPERATOR_PASSWORD_ERROR = new BusinessException ("logon_operator_password_error") ;
	
	public static BusinessException REGISTER_ACCOUNT_DUPLICATED = new BusinessException ("邮箱地址已经被使用，请更换新的邮箱地址！","register_account_duplicated") ;
	public static BusinessException REGISTER_MOBILE_DUPLICATED = new BusinessException ("该手机号码已经被使用，请更换新的手机号码！","register_mobile_duplicated") ;
	public static BusinessException REGISTER_FORM_INFORMAL = new BusinessException ("register_form_informal") ;
	public static BusinessException REGISTER_INTRODUCE_EMAIL = new BusinessException("register_introduce_email");
	
	public static BusinessException ACTIVATE_FORM_INFORMAL = new BusinessException ("activate_form_informal") ;
	public static BusinessException ACTIVATE_ACCOUNT_USING = new BusinessException ("activate_account_using") ;
	public static BusinessException ACTIVATE_ACCOUNT_NOT_EXIST = new BusinessException ("activate_account_not_exist","0004") ;
	public static BusinessException ACTIVATE_CODE_ERROR = new BusinessException ("activate_code_error") ;
	public static BusinessException ACTIVATE_ACCOUNT_LOCKED = new BusinessException ("activate_account_locked","0005") ;
	
	public static BusinessException ACCOUNT_SUBID_DUPLICATED = new BusinessException ("account_subid_duplicated") ;
	public static BusinessException ACCOUNT_OPRID_DUPLICATED = new BusinessException ("account_oprid_duplicated") ;
	
	public static BusinessException BANKNO_EMPTY = new BusinessException ("bankno_empty","0003") ; //银行卡号为空
	public static BusinessException MONEY_EMPTY = new BusinessException ("money_empty","0003") ;   //金额为空
	public static BusinessException LOGIN_PASSWORD_EMPTY = new BusinessException ("login_password_empty","0003") ;   //登陆密码为空
	public static BusinessException PAY_PASSWORD_EMPTY = new BusinessException ("pay_password_empty","0003") ;   //支付密码为空
	public static BusinessException MONEY_FORMAT_ERROR = new BusinessException ("money_format_error","0021");  //金额格式错误
	public static BusinessException BALANCE_NOT_ENOUGH = new BusinessException ("balance_not_enough","0022"); //余额不足
	public static BusinessException PAY_PASSWORD_ERROR = new BusinessException ("paypassword_error","0020");  //支付密码错误
	public static BusinessException OLD_PAY_PASSWORD_ERROR = new BusinessException ("old_paypassword_error","1501");	//原电话支付密码错误
	public static BusinessException RECEIVE_ACCOUNT_EMPTY = new BusinessException ("receive_account_empty","0003"); //收款方账户为空
	public static BusinessException PASSWORD_TOO_SHORT = new BusinessException ("password_too_short","0009"); //密码位数太短
	public static BusinessException	CORPORATION_DOES_NOT_SUPPORT	= new BusinessException("corporation_does_not_support","0009"); //不支持企业客户
	
	public static BusinessException RECEIVE_ACCOUNT_NOT_EXIST = new BusinessException("receive_account_not_exist","0501");  //收款方账户不存在
	public static BusinessException SAME_PERSON = new BusinessException("same_person","0502");  //收款/付款人相同
	public static BusinessException	RECEIVE_ACCOUNT_NOT_ACTIVE = new BusinessException("receive_account_not_active","0503");  //付款对象不是能正常使用的账户
	
	public static BusinessException ACCOUNT_AUDIT_STATUS_NOT = new BusinessException("account_audit_status_not");  //企业账号未通过审核
	public static BusinessException AMOUNT_LIMIT_EXCEED = new BusinessException("amount_limit_exceed","0023");	//金额限制
	public static BusinessException CAN_NOT_GAIN_MONEY = new BusinessException("can_not_gain_money","0401");	//您的此笔款项未经过交易，不能提现。
	public static BusinessException	NOT_EXIST_RECEIVE_ACCOUNT = new BusinessException("not_exist_receive_account","0402");//收款账户不存在
	
	public static BusinessException RESET_PWD_ACCOUNT_NOT_EXIST = new BusinessException("reset_pwd_account_not_exist","0004");
	public static BusinessException RESET_CODE_ERR_OR_INVALID = new BusinessException("reset_code_err_or_invalid");//确认码不正确或已经失效
	public static BusinessException NO_RESULT = new BusinessException("no_result","0024");
	
	public static BusinessException IDCARD_FORMACT_ERROR = new BusinessException ("idcard_format_error") ;//身份证号码格式不正确
	
	public static BusinessException IDCARD_PHOTO_EMPTY = new BusinessException ("idcard_photo_empty") ;//图片为空
	
	public static BusinessException CARD_PHOTO_EMPTY = new BusinessException ("card_photo_empty") ;//营业执照图片为空
	
	public static BusinessException CARD_PHOTO_OVER_512KB = new BusinessException ("card_photo_over_512KB") ;//营业执照图片太大
	
	public static BusinessException IDCARD_PHOTO_OVER_512KB = new BusinessException ("idcard_photo_over_512KB") ;//身份证正面图片太大
	
	public static BusinessException IDCARD_PHOTO_FORMACT_ERROR = new BusinessException ("idcard_photo_format_error") ;//图片格式话错误
	
	public static BusinessException CARD_PHOTO_FORMACT_ERROR = new BusinessException ("card_photo_format_error") ;//营业执照图片错误
	
	public static BusinessException IDCARD_PHOTO_BACK_OVER_512KB = new BusinessException ("idcard_photo_back_over_512KB") ;//身份证背面图片太大
	
	
	

	private String returnCode ;
	private String resultCode;
	
	public BusinessException (String rtnCode, Throwable reason) {
		super (rtnCode, reason) ;
		this.returnCode = rtnCode ;
	}
	
	public BusinessException (String rtnCode, String strReasonCode) {
		super (rtnCode, null) ;
		this.returnCode = rtnCode ;
		this.resultCode=strReasonCode;
	}
	
	public BusinessException (String rtnCode) {
		this (rtnCode, "A001") ;
	}

	/**
	 * @return Returns the returnMsg.
	 */
	public String getReturnCode() {
		return returnCode;
	}
	
	public String getResultCode() {
		return resultCode;
	}

}
